package Try;

public class Test5 {
    public static void main(String[] args) {
        double sum = 0;
        int p = -1;
        for (double i = 1; i <= 100; i++) {
            double a = -1/i;
            sum += a*p;
            p *= -1;
        }
        System.out.println(sum);
    }
}
